package SingleInstance;

public class NewInstance4 {
    private volatile static NewInstance4 newInstance4;

    private NewInstance4() {

    }

    public static NewInstance4 getInstance() {
        if (newInstance4 == null) {
            synchronized (NewInstance4.class) {
                if (newInstance4 == null) {
                    newInstance4 = new NewInstance4();
                }
            }
        }
        return newInstance4;
    }
}
